#ifndef __GBACKGROUND_H__
#define __GBACKGROUND_H__

#include "Object.h"
#include "QuadTree.h"

#define SIGHT_DAY "Images\\SightDay.png"
#define SIGHT_NIGHT "Images\\SightNight.png"

#define CLOUD_W		70
#define CLOUD_H		45

#define FENCE_W		140
#define FENCE_H		35

#define GRASS_W		70
#define GRASS_H		30

#define B_TREE_W	32
#define B_TREE_H	92

#define S_TREE_W	28
#define S_TREE_H	60

#define MOUNTAIN_W	310
#define MOUNTAIN_H	128

#define ARROW_W		32
#define ARROW_H		33

#define T_MAST_W	31
#define T_MAST_H	288

#define MAST_W		31
#define MAST_H		288

#define STAR_W		25
#define STAR_H		25

#define CACTUS_W	160
#define CACTUS_H	140

#define LAMP_W		110
#define LAMP_H		110

#define BUSH_W		250
#define BUSH_H		110

#define CASTLE_W	200
#define CASTLE_H	270

#define  WALL_W		70
#define  WALL_H		70

struct BrackgroundSpriteInfo
{
	int index;
	int width;
	int height;
	int deltaXSprite;
	int deltaYSprite;
	int spriteCount;
	int timeDelay;
	int lastTime;
	int mapImage;//1.sightDay 2.sightNight
};
class CBackGround :public Object
{
private:
	static 	LPDIRECT3DTEXTURE9	_sightDay;	
	static	LPDIRECT3DTEXTURE9	_sightNight;	
	BrackgroundSpriteInfo  infoDaw;

public:
	static void InitResoure();

	CBackGround(void);
	CBackGround(int left,int top,int kind);
	~CBackGround(void);
	void Draw(int VirtualLeft,int Style);
	int Move();
	void Collision(Object *Ob);
	void Release(){}
};
#endif